<?php

get_header();
?>

<div>
<?php

$opt = array(
  'post_type' => 'cars'
);

foreach (get_posts($opt) as $post) {
  the_title();
  echo "<a href='" . get_the_permalink() . "'> test </a>";
};
?>
</div>

<?php

get_footer();

?>
